package com.produce.user.service;

import com.common.dao.base.dao.BaseDao;
import com.common.dao.base.service.BaseService;
import com.produce.user.dao.DictDao;
import com.produce.user.entity.Dict;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 类描述：数据字典的service
 * @author linzf
 */
@Service
@Transactional(rollbackFor={IllegalArgumentException.class})
public class DictService  extends BaseService<Dict> {

    @Autowired
    private DictDao dictDao;

    @Override
    protected BaseDao<Dict> getDao() {
        return this.dictDao;
    }

    /**
     * 功能描述：更新数据字典的状态
     * @param entity
     * @return
     */
    public int operateDict(Dict entity){
        return dictDao.operateDict(entity);
    }

}
